from gruppenFinding import * 
"author = Schorsch"
	
global IPtxt
IPtxt = ""	
cutoff = 90
proteinMapping = readDictionary()
conservations = buildConservations(cutoff, proteinMapping)
inpalist = {}
species = "Bacteroides"


for protein in conservations:
        if str(protein) in proteinMapping:
                if proteinMapping[str(protein)]==species:
                        if species in protein.specMatches:
                                inparaloge = [str(match) for match in protein.specMatches[species]]
                                inparaloge.append(str(protein))
                                inparaloge.sort()
                                inpalist[str(inparaloge[0])] = str(inparaloge)

for i in inpalist.values():
        IPtxt = '\n'.join(inpalist)

f = open("inpalist.txt", 'w')
f.write(IPtxt)
f.close() 


                                
			
